﻿<%@ Page Title="Create Achievement" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="CreateAchievement.aspx.cs" Inherits="RLAWEB.CreateAchievement" %>
<%@ Import Namespace="RLAWEB.RLAServiceReference" %>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
    <style type="text/css">
        #GridViewFriends {
            margin-left: 250px;
        }
    </style>
    
    <h2><%: Title %>.</h2>
    <h3>Opret ny achievement.</h3>
    
    <!--
   <div class="form-horizontal">
        <h4>Opret ny bruger.</h4>
        <hr />
            <asp:ValidationSummary runat="server" CssClass="text-danger" />
            <div class="form-group">
                <asp:Label runat="server" AssociatedControlID="txttTitle" CssClass="col-md-2 control-label">Titel</asp:Label>
                <div class="col-md-10">
                    <asp:TextBox runat="server" ID="txttTitle" CssClass="form-control" />
                    <asp:RequiredFieldValidator runat="server" ControlToValidate="txttTitle"
                        CssClass="text-danger" ErrorMessage="Titel er påkrævet." />
                </div>
            </div>
       </div>
    -->
       <!-- -->
            <table class="achievement">
                <tr>
                    <td class="info">
                        <b>Titel: </b>
                    </td>
                    <td>
                        <asp:TextBox ID="txtTitle" runat="server" ></asp:TextBox>
                        <asp:RequiredFieldValidator runat="server" ControlToValidate="txtTitle"
                        CssClass="text-danger" ErrorMessage="Titel er påkrævet." />
                    </td>
                </tr>
                <tr>
                    <td>
                        <b>Beskrivelse:</b>
                    </td>
                    <td>
                        <asp:TextBox ID="txtDescription" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator runat="server" ControlToValidate="txtDescription"
                        CssClass="text-danger" ErrorMessage="Beskrivelse er påkrævet." />
                    </td>
                </tr>
                <tr>
                    <td>
                        <b>Kategori:</b>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlCategories" runat="server">
                            
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        <b>Tags: </b>
                    </td>
                    <td>
                        <asp:TextBox ID="txtTags" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <b>Tilføj venner:</b>
                    </td>
                    <td>
                       <asp:Repeater runat="server" ID="addedFriends">
                           <ItemTemplate>
                               <table>
                                   <tr>
                                       <td class="info">
                                           <asp:Label runat="server" Text='<%# Eval("FirstName") %>'/>
                                       </td>
                                       <td>
                                           <asp:Label runat="server" Text='<%# Eval("LastName") %>'/>
                                       </td>
                                       <td>
                                           <asp:Label runat="server" Text='<%# Eval("ProfileName") %>'/>
                                       </td>
                                   </tr>
                               </table>
                           </ItemTemplate>
                       </asp:Repeater>
                        <b>
                       
                        </b>
                    </td>
                </tr>
                <tr>
                    <td>
                        
                    </td>
                        

                </tr>
            </table>
    
    <br/>
    <hr/>
    <br/>

        <asp:Repeater runat="server" ID="listFriend">
            <ItemTemplate>
                <table class="achievement">
                    <tr>
                        <td>
                            <asp:Label ID="lblFirstName" runat="server" Text='<%# Eval("FirstName") %>'/>
                        </td>
                        <td>
                            <asp:Label ID="lblLastName" runat="server" Text='<%# Eval("LastName") %>'/>
                        </td>
                        <td>
                            <asp:Label ID="lblProfileName" runat="server" Text='<%# Eval("ProfileName") %>'/>
                        </td>
                        <td>
                            <asp:Button ID="btnAddFriend" runat="server" Text="Tilføj Ven" OnClick="btnAddFriend_Click" PostBackUrl='<%# String.Format("CreateAchievement?ID={0}", Eval("UserId")) %>'/>
                        </td>
                    </tr>
                </table>
            </ItemTemplate>    
        </asp:Repeater>
           <asp:Button ID="btnCreateAchievement" runat="server" Text="Opret Achievement" BorderStyle="Solid" OnClick="btnCreateAchievement_Click" />
</asp:Content>